/*
 * DRACOON API
 * REST Web Services for DRACOON<br><br>This page provides an overview of all available and documented DRACOON APIs, which are grouped by tags.<br>Each tag provides a collection of APIs that are intended for a specific area of the DRACOON.<br><br><a title='Developer Information' href='https://developer.dracoon.com'>Developer Information</a>&emsp;&emsp;<a title='Get SDKs on GitHub' href='https://github.com/dracoon'>Get SDKs on GitHub</a><br><br><a title='Terms of service' href='https://www.dracoon.com/terms/general-terms-and-conditions/'>Terms of service</a>
 *
 * OpenAPI spec version: 4.45.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package ch.cyberduck.core.sds.io.swagger.client.model;

import java.util.Objects;
import java.util.Arrays;
import ch.cyberduck.core.sds.io.swagger.client.model.UserInfo;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import org.joda.time.DateTime;
/**
 * Download Share information
 */
@Schema(description = "Download Share information")

public class DownloadShare {
  @JsonProperty("id")
  private Long id = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("nodeId")
  private Long nodeId = null;

  @JsonProperty("accessKey")
  private String accessKey = null;

  @JsonProperty("cntDownloads")
  private Integer cntDownloads = null;

  @JsonProperty("createdAt")
  private DateTime createdAt = null;

  @JsonProperty("createdBy")
  private UserInfo createdBy = null;

  @JsonProperty("updatedAt")
  private DateTime updatedAt = null;

  @JsonProperty("updatedBy")
  private UserInfo updatedBy = null;

  @JsonProperty("notes")
  private String notes = null;

  @JsonProperty("internalNotes")
  private String internalNotes = null;

  @JsonProperty("showCreatorName")
  private Boolean showCreatorName = null;

  @JsonProperty("showCreatorUsername")
  private Boolean showCreatorUsername = null;

  @JsonProperty("isProtected")
  private Boolean isProtected = null;

  @JsonProperty("expireAt")
  private DateTime expireAt = null;

  @JsonProperty("maxDownloads")
  private Integer maxDownloads = null;

  @JsonProperty("nodePath")
  private String nodePath = null;

  @JsonProperty("dataUrl")
  private String dataUrl = null;

  @JsonProperty("isEncrypted")
  private Boolean isEncrypted = null;

  @JsonProperty("nodeType")
  private String nodeType = null;

  /**
   * &amp;#128679; Deprecated since v4.11.0  Classification ID:  * &#x60;1&#x60; - public  * &#x60;2&#x60; - internal  * &#x60;3&#x60; - confidential  * &#x60;4&#x60; - strictly confidential    (default: classification from parent room)
   */
  public enum ClassificationEnum {
    NUMBER_1(1),
    NUMBER_2(2),
    NUMBER_3(3),
    NUMBER_4(4);

    private Integer value;

    ClassificationEnum(Integer value) {
      this.value = value;
    }
    @JsonValue
    public Integer getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    @JsonCreator
    public static ClassificationEnum fromValue(Integer input) {
      for (ClassificationEnum b : ClassificationEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("classification")
  private ClassificationEnum classification = null;

  @JsonProperty("notifyCreator")
  private Boolean notifyCreator = null;

  @JsonProperty("recipients")
  private String recipients = null;

  @JsonProperty("smsRecipients")
  private String smsRecipients = null;

  public DownloadShare id(Long id) {
    this.id = id;
    return this;
  }

   /**
   * Share ID
   * @return id
  **/
  @Schema(required = true, description = "Share ID")
  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public DownloadShare name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Alias name
   * @return name
  **/
  @Schema(required = true, description = "Alias name")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public DownloadShare nodeId(Long nodeId) {
    this.nodeId = nodeId;
    return this;
  }

   /**
   * Source node ID
   * @return nodeId
  **/
  @Schema(required = true, description = "Source node ID")
  public Long getNodeId() {
    return nodeId;
  }

  public void setNodeId(Long nodeId) {
    this.nodeId = nodeId;
  }

  public DownloadShare accessKey(String accessKey) {
    this.accessKey = accessKey;
    return this;
  }

   /**
   * Share access key to generate secure link
   * @return accessKey
  **/
  @Schema(required = true, description = "Share access key to generate secure link")
  public String getAccessKey() {
    return accessKey;
  }

  public void setAccessKey(String accessKey) {
    this.accessKey = accessKey;
  }

  public DownloadShare cntDownloads(Integer cntDownloads) {
    this.cntDownloads = cntDownloads;
    return this;
  }

   /**
   * Downloads counter (incremented on each download)
   * @return cntDownloads
  **/
  @Schema(required = true, description = "Downloads counter (incremented on each download)")
  public Integer getCntDownloads() {
    return cntDownloads;
  }

  public void setCntDownloads(Integer cntDownloads) {
    this.cntDownloads = cntDownloads;
  }

  public DownloadShare createdAt(DateTime createdAt) {
    this.createdAt = createdAt;
    return this;
  }

   /**
   * Creation date
   * @return createdAt
  **/
  @Schema(required = true, description = "Creation date")
  public DateTime getCreatedAt() {
    return createdAt;
  }

  public void setCreatedAt(DateTime createdAt) {
    this.createdAt = createdAt;
  }

  public DownloadShare createdBy(UserInfo createdBy) {
    this.createdBy = createdBy;
    return this;
  }

   /**
   * Get createdBy
   * @return createdBy
  **/
  @Schema(required = true, description = "")
  public UserInfo getCreatedBy() {
    return createdBy;
  }

  public void setCreatedBy(UserInfo createdBy) {
    this.createdBy = createdBy;
  }

  public DownloadShare updatedAt(DateTime updatedAt) {
    this.updatedAt = updatedAt;
    return this;
  }

   /**
   * Modification date
   * @return updatedAt
  **/
  @Schema(description = "Modification date")
  public DateTime getUpdatedAt() {
    return updatedAt;
  }

  public void setUpdatedAt(DateTime updatedAt) {
    this.updatedAt = updatedAt;
  }

  public DownloadShare updatedBy(UserInfo updatedBy) {
    this.updatedBy = updatedBy;
    return this;
  }

   /**
   * Get updatedBy
   * @return updatedBy
  **/
  @Schema(description = "")
  public UserInfo getUpdatedBy() {
    return updatedBy;
  }

  public void setUpdatedBy(UserInfo updatedBy) {
    this.updatedBy = updatedBy;
  }

  public DownloadShare notes(String notes) {
    this.notes = notes;
    return this;
  }

   /**
   * User notes
   * @return notes
  **/
  @Schema(description = "User notes")
  public String getNotes() {
    return notes;
  }

  public void setNotes(String notes) {
    this.notes = notes;
  }

  public DownloadShare internalNotes(String internalNotes) {
    this.internalNotes = internalNotes;
    return this;
  }

   /**
   * &amp;#128640; Since v4.11.0  Internal notes
   * @return internalNotes
  **/
  @Schema(description = "&#128640; Since v4.11.0  Internal notes")
  public String getInternalNotes() {
    return internalNotes;
  }

  public void setInternalNotes(String internalNotes) {
    this.internalNotes = internalNotes;
  }

  public DownloadShare showCreatorName(Boolean showCreatorName) {
    this.showCreatorName = showCreatorName;
    return this;
  }

   /**
   * Show creator first and last name.
   * @return showCreatorName
  **/
  @Schema(description = "Show creator first and last name.")
  public Boolean isShowCreatorName() {
    return showCreatorName;
  }

  public void setShowCreatorName(Boolean showCreatorName) {
    this.showCreatorName = showCreatorName;
  }

  public DownloadShare showCreatorUsername(Boolean showCreatorUsername) {
    this.showCreatorUsername = showCreatorUsername;
    return this;
  }

   /**
   * Show creator email address.
   * @return showCreatorUsername
  **/
  @Schema(description = "Show creator email address.")
  public Boolean isShowCreatorUsername() {
    return showCreatorUsername;
  }

  public void setShowCreatorUsername(Boolean showCreatorUsername) {
    this.showCreatorUsername = showCreatorUsername;
  }

  public DownloadShare isProtected(Boolean isProtected) {
    this.isProtected = isProtected;
    return this;
  }

   /**
   * Is share protected by password
   * @return isProtected
  **/
  @Schema(description = "Is share protected by password")
  public Boolean isIsProtected() {
    return isProtected;
  }

  public void setIsProtected(Boolean isProtected) {
    this.isProtected = isProtected;
  }

  public DownloadShare expireAt(DateTime expireAt) {
    this.expireAt = expireAt;
    return this;
  }

   /**
   * Expiration date
   * @return expireAt
  **/
  @Schema(description = "Expiration date")
  public DateTime getExpireAt() {
    return expireAt;
  }

  public void setExpireAt(DateTime expireAt) {
    this.expireAt = expireAt;
  }

  public DownloadShare maxDownloads(Integer maxDownloads) {
    this.maxDownloads = maxDownloads;
    return this;
  }

   /**
   * Max allowed downloads
   * @return maxDownloads
  **/
  @Schema(description = "Max allowed downloads")
  public Integer getMaxDownloads() {
    return maxDownloads;
  }

  public void setMaxDownloads(Integer maxDownloads) {
    this.maxDownloads = maxDownloads;
  }

  public DownloadShare nodePath(String nodePath) {
    this.nodePath = nodePath;
    return this;
  }

   /**
   * Path to shared download node
   * @return nodePath
  **/
  @Schema(description = "Path to shared download node")
  public String getNodePath() {
    return nodePath;
  }

  public void setNodePath(String nodePath) {
    this.nodePath = nodePath;
  }

  public DownloadShare dataUrl(String dataUrl) {
    this.dataUrl = dataUrl;
    return this;
  }

   /**
   * Path to shared download node
   * @return dataUrl
  **/
  @Schema(description = "Path to shared download node")
  public String getDataUrl() {
    return dataUrl;
  }

  public void setDataUrl(String dataUrl) {
    this.dataUrl = dataUrl;
  }

  public DownloadShare isEncrypted(Boolean isEncrypted) {
    this.isEncrypted = isEncrypted;
    return this;
  }

   /**
   * Encrypted share  (this only applies to shared files, not folders)
   * @return isEncrypted
  **/
  @Schema(description = "Encrypted share  (this only applies to shared files, not folders)")
  public Boolean isIsEncrypted() {
    return isEncrypted;
  }

  public void setIsEncrypted(Boolean isEncrypted) {
    this.isEncrypted = isEncrypted;
  }

  public DownloadShare nodeType(String nodeType) {
    this.nodeType = nodeType;
    return this;
  }

   /**
   * Node type
   * @return nodeType
  **/
  @Schema(description = "Node type")
  public String getNodeType() {
    return nodeType;
  }

  public void setNodeType(String nodeType) {
    this.nodeType = nodeType;
  }

  public DownloadShare classification(ClassificationEnum classification) {
    this.classification = classification;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  Classification ID:  * &#x60;1&#x60; - public  * &#x60;2&#x60; - internal  * &#x60;3&#x60; - confidential  * &#x60;4&#x60; - strictly confidential    (default: classification from parent room)
   * @return classification
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  Classification ID:  * `1` - public  * `2` - internal  * `3` - confidential  * `4` - strictly confidential    (default: classification from parent room)")
  public ClassificationEnum getClassification() {
    return classification;
  }

  public void setClassification(ClassificationEnum classification) {
    this.classification = classification;
  }

  public DownloadShare notifyCreator(Boolean notifyCreator) {
    this.notifyCreator = notifyCreator;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.20.0  Notify creator on every download.
   * @return notifyCreator
  **/
  @Schema(required = true, description = "&#128679; Deprecated since v4.20.0  Notify creator on every download.")
  public Boolean isNotifyCreator() {
    return notifyCreator;
  }

  public void setNotifyCreator(Boolean notifyCreator) {
    this.notifyCreator = notifyCreator;
  }

  public DownloadShare recipients(String recipients) {
    this.recipients = recipients;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  CSV string of recipient email addresses
   * @return recipients
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  CSV string of recipient email addresses")
  public String getRecipients() {
    return recipients;
  }

  public void setRecipients(String recipients) {
    this.recipients = recipients;
  }

  public DownloadShare smsRecipients(String smsRecipients) {
    this.smsRecipients = smsRecipients;
    return this;
  }

   /**
   * &amp;#128679; Deprecated since v4.11.0  CSV string of recipient MSISDNs
   * @return smsRecipients
  **/
  @Schema(description = "&#128679; Deprecated since v4.11.0  CSV string of recipient MSISDNs")
  public String getSmsRecipients() {
    return smsRecipients;
  }

  public void setSmsRecipients(String smsRecipients) {
    this.smsRecipients = smsRecipients;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DownloadShare downloadShare = (DownloadShare) o;
    return Objects.equals(this.id, downloadShare.id) &&
        Objects.equals(this.name, downloadShare.name) &&
        Objects.equals(this.nodeId, downloadShare.nodeId) &&
        Objects.equals(this.accessKey, downloadShare.accessKey) &&
        Objects.equals(this.cntDownloads, downloadShare.cntDownloads) &&
        Objects.equals(this.createdAt, downloadShare.createdAt) &&
        Objects.equals(this.createdBy, downloadShare.createdBy) &&
        Objects.equals(this.updatedAt, downloadShare.updatedAt) &&
        Objects.equals(this.updatedBy, downloadShare.updatedBy) &&
        Objects.equals(this.notes, downloadShare.notes) &&
        Objects.equals(this.internalNotes, downloadShare.internalNotes) &&
        Objects.equals(this.showCreatorName, downloadShare.showCreatorName) &&
        Objects.equals(this.showCreatorUsername, downloadShare.showCreatorUsername) &&
        Objects.equals(this.isProtected, downloadShare.isProtected) &&
        Objects.equals(this.expireAt, downloadShare.expireAt) &&
        Objects.equals(this.maxDownloads, downloadShare.maxDownloads) &&
        Objects.equals(this.nodePath, downloadShare.nodePath) &&
        Objects.equals(this.dataUrl, downloadShare.dataUrl) &&
        Objects.equals(this.isEncrypted, downloadShare.isEncrypted) &&
        Objects.equals(this.nodeType, downloadShare.nodeType) &&
        Objects.equals(this.classification, downloadShare.classification) &&
        Objects.equals(this.notifyCreator, downloadShare.notifyCreator) &&
        Objects.equals(this.recipients, downloadShare.recipients) &&
        Objects.equals(this.smsRecipients, downloadShare.smsRecipients);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, nodeId, accessKey, cntDownloads, createdAt, createdBy, updatedAt, updatedBy, notes, internalNotes, showCreatorName, showCreatorUsername, isProtected, expireAt, maxDownloads, nodePath, dataUrl, isEncrypted, nodeType, classification, notifyCreator, recipients, smsRecipients);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DownloadShare {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    nodeId: ").append(toIndentedString(nodeId)).append("\n");
    sb.append("    accessKey: ").append(toIndentedString(accessKey)).append("\n");
    sb.append("    cntDownloads: ").append(toIndentedString(cntDownloads)).append("\n");
    sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
    sb.append("    createdBy: ").append(toIndentedString(createdBy)).append("\n");
    sb.append("    updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
    sb.append("    updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
    sb.append("    notes: ").append(toIndentedString(notes)).append("\n");
    sb.append("    internalNotes: ").append(toIndentedString(internalNotes)).append("\n");
    sb.append("    showCreatorName: ").append(toIndentedString(showCreatorName)).append("\n");
    sb.append("    showCreatorUsername: ").append(toIndentedString(showCreatorUsername)).append("\n");
    sb.append("    isProtected: ").append(toIndentedString(isProtected)).append("\n");
    sb.append("    expireAt: ").append(toIndentedString(expireAt)).append("\n");
    sb.append("    maxDownloads: ").append(toIndentedString(maxDownloads)).append("\n");
    sb.append("    nodePath: ").append(toIndentedString(nodePath)).append("\n");
    sb.append("    dataUrl: ").append(toIndentedString(dataUrl)).append("\n");
    sb.append("    isEncrypted: ").append(toIndentedString(isEncrypted)).append("\n");
    sb.append("    nodeType: ").append(toIndentedString(nodeType)).append("\n");
    sb.append("    classification: ").append(toIndentedString(classification)).append("\n");
    sb.append("    notifyCreator: ").append(toIndentedString(notifyCreator)).append("\n");
    sb.append("    recipients: ").append(toIndentedString(recipients)).append("\n");
    sb.append("    smsRecipients: ").append(toIndentedString(smsRecipients)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
